package tbarker.eclipse

/**
 * Prints the dependencies from a .classpath file.
 */

assert args.size() == 1 : "Only one argument should be provided to the script, which should be a classpath file"

def classpath = new XmlParser().parse(new File(args[0]))
classpath.classpathentry.each {entry ->
    def path = entry.'@path'
    def m = (path =~ /\/([^\/]+jar$)/)
    if(m.find()) {
        println m.group(1)
    }
}
